package kr.hkit.PowerJava.chapter21;

class MyException extends Exception {

	public MyException() {
		super("사용자 정의 예제");
	}
}

public class ExceptionCustom {
	public static void main(String[] args) {
		try {
			method1();
		} catch (MyException e) {
			System.out.println(e.getMessage());
			e.printStackTrace();
		}
	}

	private static void method1() throws MyException {

		throw new MyException();
	}
}
